<link type="text/css" href="<?php echo base_url();?>assets/js/development-bundle/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo base_url();?>assets/js/development-bundle/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/development-bundle/ui/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/development-bundle/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/development-bundle/ui/jquery.ui.menu.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/development-bundle/ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/development-bundle/ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/development-bundle/ui/jquery.ui.autocomplete.js"></script>
<script>
$(document).ready(function(){
$(".tgl").datepicker({
	changeMonth: true,
	changeYear: true,
	monthNamesShort: [ "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "Nopember", "Desember" ],
	dayNames: [ "Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu" ],
	dayNamesMin: [ "M", "S", "S", "R", "K", "J", "S" ],
	showOn: "button",
	dateFormat:"dd-mm-yy",
	buttonImage: "<?php echo base_url(); ?>assets/images/calendar.gif",
	buttonImageOnly: true
});
});
<?php
if($jRekap == "kartuStok"){
?>
(function( $ ) {
	$.widget( "ui.combobox", {
		_create: function() {
			var input,
				self = this,
				select = this.element.hide(),
				selected = select.children( ":selected" ),
				value = selected.val() ? selected.text() : "",
				wrapper = $( "<span>" )
					.addClass( "ui-combobox" )
					.insertAfter( select );

			input = $( "<input>" )
				.appendTo( wrapper )
				.val( value )
				.addClass( "ui-state-default" )
				.autocomplete({
					delay: 0,
					minLength: 0,
					source: function( request, response ) {
						var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
						response( select.children( "option" ).map(function() {
							var text = $( this ).text();
							if ( this.value && ( !request.term || matcher.test(text) ) )
								return {
									label: text.replace(
										new RegExp(
											"(?![^&;]+;)(?!<[^<>]*)(" +
											$.ui.autocomplete.escapeRegex(request.term) +
											")(?![^<>]*>)(?![^&;]+;)", "gi"
										), "<strong>$1</strong>" ),
									value: text,
									option: this
								};
						}) );
					},
					select: function( event, ui ) {
						ui.item.option.selected = true;
						self._trigger( "selected", event, {
							item: ui.item.option
						});
					},
					change: function( event, ui ) {
						if ( !ui.item ) {
							var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ),
								valid = false;
							select.children( "option" ).each(function() {
								if ( $( this ).text().match( matcher ) ) {
									this.selected = valid = true;
									return false;
								}
							});
							if ( !valid ) {
								// remove invalid value, as it didn't match anything
								$( this ).val( "" );
								select.val( "" );
								input.data( "autocomplete" ).term = "";
								return false;
							}
						}
					}
				})
				.addClass( "ui-widget ui-widget-content ui-corner-left" );

			input.data( "ui-autocomplete" )._renderItem = function( ul, item ) {
				return $( "<li></li>" )
					.data( "item.autocomplete", item )
					.append( "<a>" + item.label + "</a>" )
					.appendTo( ul );
			};

			$( "<a>" )
				.attr( "tabIndex", -1 )
				.attr( "title", "Show All Items" )
				.appendTo( wrapper )
				.button({
					icons: {
						primary: "ui-icon-triangle-1-s"
					},
					text: false
				})
				.removeClass( "ui-corner-all" )
				.addClass( "ui-corner-right ui-button-icon" )
				.click(function() {
					// close if already visible
					if ( input.autocomplete( "widget" ).is( ":visible" ) ) {
						input.autocomplete( "close" );
						return;
					}

					// work around a bug (likely same cause as #5265)
					$( this ).blur();

					// pass empty string as value to search for, displaying all results
					input.autocomplete( "search", "" );
					input.focus();
				});
		},

		destroy: function() {
			this.wrapper.remove();
			this.element.show();
			$.Widget.prototype.destroy.call( this );
		}
	});
})( jQuery );
$(function() {
	$( "#nama_obat" ).combobox();
});
<?php
}
?>
</script>
<style>
	.ui-widget {
		font-family:arial;
		font-size: 10pt;
		font-weight:normal;
		color:black;
	}
	.ui-datepicker-month{
		float:left;
	}
	.ui-datepicker-year{
		float:left;
	}
	.ui-datepicker-title{
		width:172px;
	}
	.ui-combobox {
		position: relative;
		display: inline-block;
	}
	.ui-button {
		position: absolute;
		top: 0;
		bottom: 0;
		margin-left: -1px;
		padding: 0;
		/* adjust styles for IE 6/7 */
		*height: 1.7em;
		*top: 0.1em;
	}
	.ui-autocomplete-input {
		margin: 0;
		padding: 0.3em;
	}
	.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
		border: 1px solid #cccccc;
		background: #ffffff;
		font-weight: bold;
		color: #1c94c4;
	}
</style>
<div class="form-head">Form Rekap</div>
<hr>
<?php
echo form_open("", array("name"=>"formRekapPasien","id"=>"medic_form"));
$tgl_awal	= set_value("tgl_awal");
$tgl_akhir	= set_value("tgl_akhir");
?>
<p>
	<label class="required">Periode</label>
	<input type="text" class="tgl" readonly name="tgl_awal" value="<?php echo $tgl_awal; ?>"> s/d <input type="text" class="tgl" readonly name="tgl_akhir" value="<?php echo $tgl_akhir; ?>">
	<?php echo form_error("tgl_awal"); ?>
	<?php echo form_error("tgl_akhir"); ?>
</p>
<?php
if($jRekap == TRUE){
	if($jRekap == "Pengeluaran"){
	?>
	<p>
		<label class="required">
		<select name="jenis">
			<option value="">-- Pilih Jenis --</option>
			<option value="2">Semua</option>
			<option value="1">Umum</option>
			<option value="0">Gigi</option>
		</select>
	</p>
	<?php echo form_error("jenis"); ?>
	<?php
	} else {
	?>
	<p>
		<label class="required">
		<select name="nama_obat" id="nama_obat">
		<option value=""></option>
		<?php
		foreach($getObat as $row){
		?>
			<option value="<?php echo $row["ID_OBAT"]; ?>"><?php echo $row["NAMA_OBAT"]; ?></option>
		<?php
		}
		?>
		</select>
		<?php echo form_error("nama_obat"); ?>
	</p>
	<?php
	}
}
?>
<p>
	<input type="submit" class="btn btn-success" id="submit" value="Cetak">
</p>
<?php echo form_close(); ?>